package com.bbzn.user.client;

import com.bbzn.user.comment.Tenant;
import com.bbzn.user.comment.User;
import com.bbzn.user.comment.res.TenantRes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * @Author 蒋洪媛
 * @Date 2021/12/09 10:36
 * @Version 2.0
 */
@FeignClient("user")
@RequestMapping("tenant")
public interface TenantClient {

    /**
     * 超级管理员 - 查询所有公司下的用户信息
     * @return
     * @throws Exception
     */
    @PostMapping("/selectTenantUnUserAll")
    List<TenantRes> selectTenantUnUserAll() throws Exception;

    /**
     * 公司账号 - 查询所有公司下的用户信息
     * @return
     * @throws Exception
     */
    @PostMapping("/selectTenantUnUser")
    List<TenantRes> selectTenantUnUser(@RequestBody Long userId) throws Exception;


    /**
     * 根据租户id查询租户信息
     * @return
     * @throws Exception
     */
    @PostMapping("/selectByPrimaryKey")
    Tenant selectByPrimaryKey(@RequestBody Long tenantId) throws Exception;
}









